/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AdminScreen2.java
 *
 * Created on 10 21, 11, 1:04:47 PM
 */

/**
 *
 * @author kylle
 */
public class AdminScreen2 extends javax.swing.JFrame {

    /** Creates new form AdminScreen2 */
    public AdminScreen2() {
        initComponents();
        this.setBounds(500, 100, 400, 500);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        as2homebtn = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        updateEmpInfoBtn = new javax.swing.JButton();
        addEmpBtn = new javax.swing.JButton();
        cancelEmpBtn = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("Admin Name");

        as2homebtn.setText("View Employee Info");
        as2homebtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                as2homebtnMouseClicked(evt);
            }
        });
        as2homebtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                as2homebtnActionPerformed(evt);
            }
        });

        jButton1.setText("Update Employee Salary");
        jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton1MouseClicked(evt);
            }
        });
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText("Logout");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        updateEmpInfoBtn.setText("Update Employee Info");
        updateEmpInfoBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                updateEmpInfoBtnMouseClicked(evt);
            }
        });

        addEmpBtn.setText("Add Employee");
        addEmpBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                addEmpBtnMouseClicked(evt);
            }
        });

        cancelEmpBtn.setText("Cancel Employee");
        cancelEmpBtn.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cancelEmpBtnMouseClicked(evt);
            }
        });
        cancelEmpBtn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelEmpBtnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(113, 113, 113)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(cancelEmpBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(as2homebtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(updateEmpInfoBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(addEmpBtn, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
                .addGap(169, 169, 169))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(226, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton2)
                .addGap(77, 77, 77))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jButton2))
                .addGap(68, 68, 68)
                .addComponent(addEmpBtn)
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addGap(18, 18, 18)
                .addComponent(updateEmpInfoBtn)
                .addGap(18, 18, 18)
                .addComponent(as2homebtn)
                .addGap(18, 18, 18)
                .addComponent(cancelEmpBtn)
                .addContainerGap(77, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton2ActionPerformed

    private void as2homebtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_as2homebtnActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_as2homebtnActionPerformed

    private void as2homebtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_as2homebtnMouseClicked
        new ViewEmployeeInfo().setVisible(true);
        this.setVisible(false);
}//GEN-LAST:event_as2homebtnMouseClicked

    private void cancelEmpBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelEmpBtnActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cancelEmpBtnActionPerformed

    private void addEmpBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addEmpBtnMouseClicked
       new AddEmployee().setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_addEmpBtnMouseClicked

    private void cancelEmpBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelEmpBtnMouseClicked
        new RemoveEmployee().setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_cancelEmpBtnMouseClicked

    private void updateEmpInfoBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_updateEmpInfoBtnMouseClicked
      new UpdateEmployeeInfo().setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_updateEmpInfoBtnMouseClicked

    private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
         new UpdateSalaryPrompt().setVisible(true);
       // this.setVisible(false);
    }//GEN-LAST:event_jButton1MouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new AdminScreen2().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addEmpBtn;
    private javax.swing.JButton as2homebtn;
    private javax.swing.JButton cancelEmpBtn;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JButton updateEmpInfoBtn;
    // End of variables declaration//GEN-END:variables

}
